package com.thinking.project.monitorserver.pojo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;


@JsonIgnoreProperties(ignoreUnknown = true)
public class Worker  implements Serializable {
    private Integer workerId;

    @NotEmpty(message = "员工姓名不能为空！")
    private String workerName;
    @NotNull(message = " 1 男 0女   默认值 1")
    private int workerSex;
    @NotNull(message = "必须归属组织节点！")
    private Integer depId;

    @NotEmpty(message = "登录用户名称不能为空！")
    @Size(min = 1, max = 50)
    private String username;



    private String password;

    public Integer getWorkerId() {
        return workerId;
    }

    public void setWorkerId(Integer workerId) {
        this.workerId = workerId;
    }

    public String getWorkerName() {
        return workerName;
    }

    public void setWorkerName(String workerName) {
        this.workerName = workerName == null ? null : workerName.trim();
    }


    public Integer getDepId() {
        return depId;
    }

    public void setDepId(Integer depId) {
        this.depId = depId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public int getWorkerSex() {
        return workerSex;
    }

    public void setWorkerSex(int workerSex) {
        this.workerSex = workerSex;
    }

    @Override
    public String toString() {
        return "Worker{" +
                "workerId=" + workerId +
                ", workerName='" + workerName + '\'' +
                ", worderSex=" + workerSex +
                ", depId=" + depId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }


}